#define DEBUG
#include <cstdio>
#define MODS 258280327
#define MAXN 2000

using namespace std;

long long qpower(long long a, int n) {
  long long s=1;
  for (; n>1; n>>=1) {
    if (n&1) {
      s = s*a%MODS;
    }
    a = a*a%MODS;
  }
  return a*s%MODS;
}

int main() {
#ifdef DEBUG
  freopen("4212.in", "r", stdin);
  freopen("4212.out", "w", stdout);
#endif

  int t;
  scanf("%d", &t);
  for (int ti=1; ti<=t; ti++) {
    int n, x, y;
    scanf("%d %d %d", &n, &x, &y);
    long long p=x*qpower(y, MODS-2)%MODS, tn=qpower(n, MODS-2);
    static long long pow[MAXN+1];
    pow[0] = 1, pow[1] = (1+MODS-p)%MODS;
    for (int i=2; i<=n; i++) {
      pow[i] = pow[i-1]*pow[1]%MODS;
    }

    static long long f[MAXN+1][MAXN+1];
    f[0][0] = 1;
    for (int i=1; i<=n; i++) {
      f[0][i] = 0;
    }
    for (int i=1; i<=n; i++) {
      for (int j=1; j<=i; j++) {
	f[i][j] = (f[i-1][j-1]*pow[j-1]%MODS+f[i-1][j]*(1+MODS-pow[j])%MODS)%MODS;
      }
    }
    for (int i=0; i<n; i++) {
      long long ans=0;
      for (int j=i+1; j<=n; j++) {
	ans = (ans+f[j-1][i])%MODS;
      }
      ans = ans*pow[i]%MODS*tn%MODS;
      printf("%lld ", ans);
    }
    printf("\n");
  }

  fcloseall();
  return 0;
}
